#include "Mailer.h"
#include <fcntl.h>
int main()
{
    //CMailer* mailer = new CMailer();
    CMailer* mailer = new CMailer("smtp.163.com");
    //mailer->set_smtp("smtp.163.com");
    //mailer->set_user("lyccode@163.com", "299792458");
    char buf[10240] = {0};
    int fd = open("mail.mime", O_RDONLY);
    int len = read(fd, buf, 10240);

    mailer->send_mail("lyc1990@qq.com","=?utf-8?B?5Lit5paH5Li76aKYdXRmLTg=?=", buf, len);

    close(fd);
    delete mailer;
    return 0;
}

